RiskSourceReviewForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        RiskSourceReviewForm.superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "危险源评审信息",
            iconCls : "menu-flowWait",
            width : 620,
            height : 375
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/dangeroussource/saveRiskSourceReview.do",
                items:[
                        {
                            id : "riskSourceReview.id",
                            name : "riskSourceReview.id",
                            xtype : "hidden",
                            value : this.id == null ? "": this.id
                        }, {
                            name : "riskSourceReview.years",
                            xtype : "hidden",
                            id : "riskSourceReview.years",
                            value : this.years == null ? "" : this.years
                        },{
                           layout:"column",
                           bodyStyle:"padding:5px;",
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               border:false,
                               columnWidth:.5,
                                   items:[{
                                       xtype:"textfield",
                                       fieldLabel:'危险源' + '<font color=red>*</font>',
                                       name:'riskSourceReview.riskSource',
                                       maxLength:80,
                                       allowBlank:false,
                                       width:146
                                   }]
                               },{
                                   layout:"form",
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       xtype:"textfield",
                                       fieldLabel:'评审部门',
                                       name:'riskSourceReview.reviewDept',
                                       maxLength:80,
                                       width:146
                                   }]
                               },{
                                   layout:"form",
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                	   xtype:'datefield',
                                       fieldLabel:'评审日期',
                                       name:'riskSourceReview.reviewDate',
                                       format:'y-m-d',
                                       width:146
                                   }]
                               },{
                                   layout:"form",
                                   bodyStyle:"padding:5px;",
                                   border:false,
                                   columnWidth:.5,
                                   items:[{
                                       xtype:"textfield",
                                       fieldLabel:'评审状态',
                                       name:'riskSourceReview.reviewStatus',
                                       maxLength:80,
                                       width:146
                                   }]
                               }
                            ]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:"textarea", 
                               fieldLabel: '评审结论', 
                               name: 'riskSourceReview.reviewResult', 
                               width : 448 
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:'form',
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:'textarea',
                               fieldLabel:'备注',
                               name:'riskSourceReview.remark',
                               width:448
                               }]
                           }]
                       }
               ]
            },
            loadData:{
                getUrl:__ctxPath +"/dangeroussource/getRiskSourceReview.do",
                preName : "riskSourceReview"
            }
        });
    }
});
